<template>
  <div style="height:100%;">

      <el-card class="box-card" style="height:100%;background-color:#B5C3B4;">
        <div slot="header" class="clearfix">
            <h2>欢迎您的意见及建议</h2>
        </div>
        <p>
            "感谢您使用泡泡城酒店官网！请告诉我们您对泡泡城酒店官网的意见和建议，我们会参考您的反馈不断优化我们的产品和服务。<br>
                            （如有其他疑问和建议，" 
                            <a href="http://localhost:8080/#/customerservice">请联系公司相关业务部门</a>
                            "。）"
        </p>
        <br>
        <el-form :model="suggest" label-width="80px">
            <h4 class="tit" style="padding-top:0px;">请详细描述您遇到的问题、您的意见及建议:</h4>
            <br>
            <el-form-item label="建议内容">
                <el-input type="textarea" v-model="suggest.scontent" ></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">发表</el-button>
            </el-form-item>
        </el-form>
      </el-card>
        
      
  </div>
</template>

<script>
import {declareoneself} from '../../api'
export default {
    data() {
        return {
            suggest : {}
        }
    },
    created() {
        
    },
    methods: {
        async onSubmit(){
            let userid = sessionStorage.getItem('userid')
            if(userid == null || userid == undefined){
                this.$message.error('请先登录！！！')
                this.$router.push('/userLogin')
            }else{
                this.suggest.sperson = userid
                let {data:baseRefault} = await declareoneself(this.suggest)
                this.$message.success(baseRefault.message)
                this.$router.push('/main')
            }
            
        }
    },
}
</script>

<style>
a {
    color: #3eaf0e;
    
}
 p {
    padding: 0 0 0 36px;
}

</style>